{% extends "templates/base.phtml" %}
{%block content%}
{% if wxc is defined %}
<!-- PAGE CONTENT WRAPPER -->
<script type="text/javascript" charset="utf-8" src="/assets/ueditor/ueditor.config.js"
        xmlns="http://www.w3.org/1999/html"></script>
<script type="text/javascript" charset="utf-8" src="/assets/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="/assets/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    var ue = UE.getEditor('editor');
    UE.getEditor('editor');

</script>
<div class="page-content-wrap">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default tabs">
                <ul class="nav nav-tabs" role="tablist">
                    <li ><a href="admin/appact/detail/{{act.aid}}">活动详情</a></li>
                    <li class="active"><a href="admin/appact/manage/{{act.aid}}">报名管理</a></li>
                </ul>
                <div class="panel-body tab-content">
                    <div class="tab-pane active">
                        <div class="col-md-12">
                            <div class="col-md-3 col-xs-6 pull-left">
                                <h3>报名情况</h3>
                            </div>
                            <div class="col-md-2 col-xs-2 pull-right">
                                <a class="btn btn-success back" href="admin/appact">返回</a>
                            </div>
                            <div class="form-horizontal">
                                <div class="panel panel-default">
                                    <div class="panel-body def-pan-bd">
                                        <div class="col-bd col-md-12 col-xs-12">
                                            <div class="col-md-12 form-horizontal">
                                              <!--  <div class="btn-group pull-right">
                                                    <a class="btn btn-success" href="#">
                                                        <i class="fa fa-plus"></i>
                                                        BUTTON</a>
                                                </div>-->


                                                <div class="form-horizontal col-md-12 app-wrap">
                                                    <div class="table-responsive">
                                                        <table class="define-table table table-bordered">
                                                            <thead>
                                                            <tr>
                                                                <th>姓名</th>
                                                                <th>电话号码</th>
                                                                <th>操作</th>
                                                            </tr>
                                                            </thead>
                                                            <tbody class="define-tbody">
                                                            <!--  增加-->
<!--                                                            <form method="post">-->
<!--                                                            <td>-->
<!--                                                                <div class="col-md-6 col-sm-10 col-xs-10">-->
<!--                                                                    <input name="name" type="text" class="form-control" placeholder="请输入要增加的名字"/>-->
<!--                                                                </div>-->
<!---->
<!--                                                            </td>-->
<!---->
<!--                                                            <td>-->
<!--                                                                <div class="col-md-6 col-sm-10 col-xs-10">-->
<!--                                                                    <input name="tel" type="text" class="form-control" placeholder="请输入电话">-->
<!--                                                                </div>-->
<!---->
<!--                                                            </td>-->
<!--                                                            <td>-->
<!--                                                                <button class="btn btn-success " >增加</button>-->
<!--                                                            </td>-->
<!--                                                            </form>-->
                                                            {% for actuser in page.items %}
                                                            <tr class="main-list">
                                                                <td>
                                                                    <div class="col-md-6 col-sm-10 col-xs-10">
                                                                        <input  type="text" class="form-control"value="{{actuser.name}}"/>
                                                                    </div>

                                                                </td>

                                                                <td>
                                                                    <div class="col-md-6 col-sm-10 col-xs-10">
                                                                        <input  type="text" class="form-control" value="{{actuser.tel}}">
                                                                    </div>

                                                                </td>

                                                                <td>
                                                                    <button class="delete_m" name="id" onclick="deleteConfirm({{ actuser.id }});" >删除</button>
                                                                </td>

                                                            </tr>

                                                            {% endfor %}
                                                            </tbody>
                                                         </table>
                                                    </div>

                                                    {% include 'include/page' with ['page':page,'cla':'pagination pagination-sm pull-right','url':'/admin/appact/manage/'~act.aid~'/?page='] %}
                                                </div>

<!--                                                <div class="form-group col-md-12">-->
<!--                                                    <div class="col-md-6 col-xs-12 col-md-offset-4">-->
<!--                                                        <button class="btn btn-primary ">保存</button>-->
<!--                                                        <button class="btn btn-danger">取消</button>-->
<!--                                                    </div>-->
<!--                                                </div>-->
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<script type="text/javascript">
    function deleteConfirm(delete_id){
        noty({
            text: '确定要删除么?',
            layout: 'topRight',
            buttons: [
                {addClass: 'btn btn-success btn-clean', text: '确定', onClick: function($noty) {
                    $noty.close();
                    $.post('/admin/appact/deleteuser/'+delete_id,{},function(result){
                        noty({text: '删除成功', layout: 'topRight', type: 'success'}
                        );
                        setTimeout(function(){
                            location.reload();
                        },1000);
                    });
                }
                },
                {addClass: 'btn btn-danger btn-clean', text: '取消', onClick: function($noty) {
                    $noty.close();
                }
                }
            ]
        })
    }
</script>
<!-- END PAGE CONTENT WRAPPER -->
{%endif%}
{%endblock%}